wayland: Prevent stale paints and weird artifacts when using Weston
authorJasper St. Pierre <jstpierre@mecheye.net>
Fri, 20 Jun 2014 12:55:19 +0000 (08:55 -0400)
committerJasper St. Pierre <jstpierre@mecheye.net>
Fri, 20 Jun 2014 13:02:02 +0000 (09:02 -0400)
commit76922c169f0699d9b85ef3eff2170f2cede1782c
tree5d73bdfc49c990a6dbb7fa5255e59376c128a9fc
parent2672837a1471ba6f3f6afe1ab7017f3c10b21d76
wayland: Prevent stale paints and weird artifacts when using Weston

Weston releases buffers almost immediately after they're done, which
means that GTK+ doesn't use a temporary surface and instead paints
directly onto the SHM backing store that Weston will use.

Normally, after painting to the temporary surface, GTK+ *replaces*
the existing backing surface with CAIRO_OPERATOR_SOURCE. However,
if we immediately paint to the backing surface, it might have junk
from the last paint in it. So clear out the backing surface whenever
somebody calls begin_paint_region().

Maybe we should just always use the temporary surface like the X11
codepath, since that prevents us from having to do weird things like
this, but oh well.
gdk/wayland/gdkdisplay-wayland.c
gdk/wayland/gdkprivate-wayland.h
gdk/wayland/gdkwindow-wayland.c